package com.idenger.modules.edu.entity.common;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by zp on 17/6/27.
 */
public class BaseResponseMsg {
    private ResponseMsg responseMsg;
    List<Object> data = new ArrayList<Object>();

    public BaseResponseMsg() {
        super();
    }

    public BaseResponseMsg(ResponseMsg responseMsg) {
        super();
        this.responseMsg = responseMsg;
    }

    public ResponseMsg getResponseMsg() {
        return responseMsg;
    }

    public void setResponseMsg(ResponseMsg responseMsg) {
        this.responseMsg = responseMsg;
    }

    public List<Object> getData() {
        return data;
    }

    public void setData(List<Object> data) {
        this.data = data;
    }

    // 跟节点返回数据
    public void addData(Object ObjData) {
        this.data.add(ObjData);
    }

    // 指定KEY值 设置返回数据
    @SuppressWarnings({ "unchecked", "rawtypes" })
    public void addData(String Key, Object ObjData) {
        Map<String, Object> map = new HashMap();
        map.put(Key, ObjData);
        this.data.add(map);
    }
}
